home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / GNUUCP_2 / SOURCE / UUCP.H < prev    next >
Text File  |  1990-06-08  |  4KB  |  96 lines

  1. /*
  2.  * @(#)uucp.h 1.9 87/09/29    Copyright 1987 Free Software Foundation, Inc.
  3.  *
  4.  * Copying and use of this program are controlled by the terms of the
  5.  * GNU Emacs General Public License.
  6.  *
  7.  * Header file for gnuucp.
  8.  *
  9.  * Pieces that look like they might be taken from Unix uucp are
  10.  * cribbed with the aid of public domain uucp modules (like the F-protocol)
  11.  * that use that interface.
  12.  */
  13.  
  14. #define Ifn    FOO    /* file descriptor of the "phone line" */
  15.  
  16. #define    ASSERT(cond, msg, moremsg, huh) /**/
  17. #define    prefix(s, l)    \
  18.         (strncmp(s, l, strlen(s)) == SAME)
  19.  
  20. #define    DEBUG(level, msg, moremsg) \
  21.     {if ((long)debug >= (long)level) printf(msg, moremsg);}
  22. #define    DEBUG_LEVEL(level) \
  23.        ((long)debug >= (long)level)
  24.  
  25. /* I may have these flipped from what Unix uses... */
  26. /* BUT: my code depends on these values in if (foo()) statements, sigh */
  27. #define    SUCCESS    0
  28. #define    FAIL    1
  29.  
  30. #define    MAXMSGLEN    ((NAMESIZE*4)+SLOP)    /* ?>?? FIXME */
  31. #define    MAXMSGTIME    60    /* Timeout period for rdmsg */
  32. #define    MAX_HOST    20    /* Host name length (uucp does 7) */
  33. #define    MAXBASENAME    7    /* Host name length in queue file names */
  34. #define    SYSNSIZE    MAXBASENAME    /* uuq uses */
  35. #define    CMDPRE        'C'        /* Prefix on command files */
  36. #define    X_LOCK        "XQT"    /* Lock name for uuxqt runs */
  37. #define    MAX_LSYS    500    /* Max length of an L.sys line in chars */
  38. #define    MAX_CTLLINE    100    /* Max length of a usenet.ctl line */
  39.  
  40. #define    CTL_DELIM    " \t\n\r"    /* Delimiters for usenet.ctl */
  41.  
  42. extern int debug;            /* Debugging level */
  43.  
  44. /*
  45.  * Timeout for raw characters -- if we don't hear a char within BYTE_TIMEOUT
  46.  * seconds, we assume the other side has gone away.  Has nothing to do with
  47.  * retransmission timeouts (if any!).
  48.  */
  49. #define    BYTE_TIMEOUT    15    /* seconds */
  50. #define CONNECT_WAIT 15
  51. #define    ONEDAY        (24*60*60)    /* seconds */
  52.  
  53. /* Misc stuff */
  54. #define    SAME        0        /* if (strcmp(a,b) == SAME) ... */
  55. #define    SLOP        10        /* Slop space on arrays */
  56.  
  57. /* STST system status file codes */
  58. #define    SS_WRONGTIME    99        /* Wrong time to call -- not used */
  59. #define    SS_INPROGRESS    3        /* Talking */
  60. #define SS_FAIL        4        /* Dial failed */
  61. #define    MAXRECALLS    20        /* Max # of recalls if STST there */
  62.  
  63. /*
  64.  * Definition of serial ports that we can call out on.
  65.  */
  66. #define    PORTNAME_SIZE    20        /* Arbitrary */
  67. struct port {
  68.     char    portname[PORTNAME_SIZE]; /* Name of port type, e.g. ACU */
  69.     char    modemname[PORTNAME_SIZE]; /* Name of dialer type, e.g. hayes */
  70.     char    devname [PORTNAME_SIZE]; /* Name of device, e.g. cua0, com1 */
  71.     long    baud;            /* A baud rate that works */
  72.     struct port *chain;        /* Chain to next entry */
  73. };
  74.  
  75. /* Variables that uucp uses for various things */
  76. extern char    Progname[20];            /* Our program name e.g. "uuq" */
  77. extern char    *Spool;            /* Our spool directory */
  78. extern char *Alias;            /* Directory for aliases */
  79. extern char    *uuControl;        /* Our control file */
  80. extern char    Myname[MAX_HOST];    /* Our host name */
  81. extern char    Mynamealias[MAX_HOST];    /* Our host name */
  82. extern char    host_name[MAX_HOST];    /* Other guy's host name */
  83. extern char Forwarder[MAX_HOST]; /*Default forwarder for mail not on this host */
  84. extern int    ourpid;            /* Our process ID */
  85. extern char    *Sysfile;        /* L.sys file */
  86. extern char    *Userfile;        /* USERFILE */
  87. extern char *Mail;            /* Our mail directory */
  88. extern char    *Pubdir;        /* Public Directory */
  89. extern char *UUCPlogname;   /* Login name for remote UUCP's */
  90. extern char *UUCPpasswd;    /* password for remote UUCP's */
  91. extern struct port *ports;        /* List of serial ports */
  92. extern char    who[NAMESIZE];        /* User who sent/requested a file */
  93. extern int    logfd;            /* File descriptor of log file */
  94. extern long ByteTimeout;    /* Max time (in Secs that xgetc waits for a char */
  95. extern long ConnectWait;
  96. extern char *Timezone;